Martin Buck delivers "track" upload for Garmin fitness devices.
authorrobertl <robertl>
Fri, 26 Mar 2010 03:33:18 +0000 (03:33 +0000)
committerrobertl <robertl>
Fri, 26 Mar 2010 03:33:18 +0000 (03:33 +0000)
commit6a46bc58d683738b75e998287d49e687b9b99725
treeb6397c8b9413dd7aaa4dcd8cc0c97c7d502a2b77
parent3fae70d8985b31743ada3b654cf3b7ae4c71fd93
Martin Buck delivers "track" upload for Garmin fitness devices.

Changes:
* If tracks and waypoints should be uploaded to a device supporting course
 upload, combine them to courses and course points and upload them together
* Split track/waypoint preparation and upload into separate functions in
 garmin.c since both preparation functions are needed together for
 course+course point upload
* Merged GPS_A301_Get()/GPS_A302_Get, GPS_A301_Send()/GPS_A302_Send()
* Properly handle track segment markers for fitness devices consisting of 2
 consecutive invalid track points
* Calculate lap data totals when creating a course. Also create time stamps
 (currently using a hardcoded speed of 10km/h) for track points that lack
 them. This is required so that course points can refer to track points and
 identify them uniquely.
* Fixed course garbage collection to remove unused track points properly. So
 far, we compared the track index with the course index instead of the
 course track index which inadvertently removed tracks that were
 refereneced and left others that weren't referenced.
* Remove duplicate course points (same course index and track point time
 stamp) because the protocol spec requires these two values to be unique.
* Create course points from waypoints by mapping them to the nearest track
 point.
* Use xrealloc() consistently
garmin.c
jeeps/gpsapp.c
jeeps/gpsapp.h
jeeps/gpscom.c
jeeps/gpscom.h